Previous Book Contents Book Index Next

Inside Macintosh: Open Transport /
Chapter 11 - AppleTalk Service Providers / AppleTalk Service Provider Reference
Functions / Obtaining Information About Zones


OTATalkGetMyZone

Obtains the AppleTalk zone name of the node on which your application
is running.

C INTERFACE
OSStatus OTATalkGetMyZone(ATSvcRef ref, TNetbuf* zone);
C++ INTERFACE
TAppleTalkServices::GetMyZone(TNetbuf* zone)
PARAMETERS
ref
The reference value of your AppleTalk service provider.
zone
A pointer to a TNetbuf structure that you use to get your application's AppleTalk local zone name.
DESCRIPTION
The OTATalkGetMyZone function gets the name of your application's AppleTalk zone. If you call this function asynchronously, Open Transport calls your application's notifier with a T_GETMYZONECOMPLETE completion event to signal the function's completion and uses your notifier's cookie parameter for the zone name. More precisely, the cookie parameter points to a TNetbuf structure that in turn points to a buffer containing the zone name, which is stored as a Pascal-style string. The string can be up to 32 characters in length, so with the addition of a length byte, the buffer can have a maximum size of 33 bytes. Using a Pascal-style string for the zone name is redundant since you can determine the length of the string from the maxlen field of the TNetbuf structure, but the other zone-related calls use Pascal-style strings, so this call also uses them for consistency.

COMPLETION EVENT CODES
T_GETMYZONECOMPLETE0x23010001The OTATalkGetMyZone function has completed.
SEE ALSO
To obtain a list of all zones in your extended network, use the OTATalkGetLocalZones function (page 11-17).

To obtain a list of all zones on the AppleTalk internet to which your network belongs, use the OTATalkGetZoneList function (page 11-18).


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 AUG 1996